<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2019/7/4
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Visual Admin - Login</title>
    <meta name="description" content="">
    <!--
Visual Admin Template
http://sc.chinaz.com/preview/templatemo_455_visual_admin
-->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,700' rel='stylesheet' type='text/css'>
    <link href="${pageContext.request.contextPath }/css/font-awesome.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/templatemo-style.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script>

</head>
<body class="light-gray-bg">
<div class="templatemo-content-widget templatemo-login-widget white-bg">
    <header class="text-center">
        <div class="square"></div>
        <h1>管理员登录</h1>
    </header>
    <form action="${pageContext.request.contextPath }/AdmainindexServlet" class="templatemo-login-form">
        <div class="form-group">
            <div class="input-group">
                <div class="input-group-addon"><i class="fa fa-user fa-fw"></i></div>
                <input type="text" class="form-control" name="admainname" id="adname" onchange="checkName()" placeholder="用户名">
            </div>
            <span style="color: red;margin-left: 50px;" id="namespan"></span>
        </div>
        <div class="form-group">
            <div class="input-group">
                <div class="input-group-addon"><i class="fa fa-key fa-fw"></i></div>
                <input type="password" name="password" class="form-control" id="adpwd" placeholder="密码">
            </div>
        </div>
        <div class="form-group">
            <button type="submit" class="templatemo-blue-button width-100" onclick="checkpwd">登录</button>
        </div>
    </form>
</div>
</body>
</html>
<script>
    function checkName() {
        var adname = $('#adname').val();
        if ((adname != "gao") && (adname != "zhou")) {
            $('#namespan').html("该管理员不存在");
            return false;
        }
        else {
            $('#namespan').html("");
        }
    }
</script>
